package com.zhiwei.jenkins.common.basics;

import com.zhiwei.jenkins.common.enums.ResponseCode;

/**
 * @Description: java类作用描述
 * @Author: wyjun
 * @UpdateDate: 2019/11/14 9:56
 * @Version: 1.0
 */
public class BaseResponse extends  Base {

    protected int code;

    protected String msg;

    protected long serverTime;

    /**
     * 成功响应
     */
    public BaseResponse() {
        this.code = ResponseCode.SUCCESS.getHttpCode();
        this.msg = ResponseCode.SUCCESS.getMsg();
        this.serverTime = System.currentTimeMillis();
    }

    /**
     * 成功响应
     */
    public BaseResponse(String msg) {
        this.code = ResponseCode.SUCCESS.getHttpCode();
        this.msg = msg;
        this.serverTime = System.currentTimeMillis();
    }

    public BaseResponse(int code, String msg) {
        this.code = code;
        this.msg = msg;
        this.serverTime = System.currentTimeMillis();
    }
    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public long getServerTime() {
        return serverTime;
    }
    public void setServerTime(long serverTime) {
        this.serverTime = serverTime;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
